﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace SpriteWithXNA
{
    public class MyMenu : MySprite
    {
        public MyMenu(Texture2D[] _inputtexture2d, float _inputx, float _inputy)
        {
            texture2d = _inputtexture2d;
            x = _inputx;
            y = _inputy;
            itexture2d = 0;
            ngameTime = 0;
        }
        private static int i = 0;
        public override void Update(GameTime gameTime)
        {
            i++;
            if (y < 500)
                y = (float)(y + (0.0002 * i * i) / 2);
            else y = 500;
        }
        public  void Draw(GameTime gameTime, SpriteBatch spriteBatch, int isselect)
        {
            if(isselect ==0)
            spriteBatch.Draw(texture2d[_itexture2d], new Vector2(x, y), Color.White);
            else
                spriteBatch.Draw(texture2d[_itexture2d], new Vector2(x, y), Color.DeepSkyBlue);


        }
    }
}
